package com.css.zfzx.sjcj.modules.hddcB4_SampleDataTable.repository;

import com.css.zfzx.sjcj.modules.hddcB4_SampleDataTable.repository.entity.HddcB4SampledatatableEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zhangcong
 * @date 2020-11-30
 */
public interface HddcB4SampledatatableRepository extends JpaRepository<HddcB4SampledatatableEntity, String> {
    @Query(nativeQuery = true, value = "select * from hddc_b4_sampledatatable where is_valid =1 and project_name in :projectIds")
    List<HddcB4SampledatatableEntity> queryByProjectId(List<String> projectIds);

    @Query(nativeQuery = true, value = "select * from hddc_b4_sampledatatable where is_valid =1 and task_name in :taskIds")
    List<HddcB4SampledatatableEntity> queryByTaskId(List<String> taskIds);
}
